An ic card reading/writing apparatus and an ic card system

ABSTRACT

An IC card reading/writing apparatus has an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself. The IC card reading/writing control unit has, in addition to the intelligent function, a pass-through function to control read-out/write-in processing for the IC card by an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from the host. With this arrangement, the IC card reading/writing apparatus can execute read-out/write-in processing for the IC card with either the intelligent function or the pass-through function, thereby minimizing a cost required to configure an IC card system.

BACKGROUND OF THE INVENTION

[0001] (1) Field of the Invention

[0002] The present invention relates to an IC card (smart card) reading/writing apparatus and an IC card system. In particular, the present invention relates to an IC card reading/writing apparatus having both an intelligent function and a path-through function, and an IC card system using the IC card reading/writing apparatus.

[0003] (2) Description of the Related Art

[0004] There is a tendency in these years to distribute processes (functions) in a system in order to reduce a burden of a host system to terminals or like that. In a card system using an IC (Integrated Circuit) card, an intelligent-type IC card reading/writing (R/W: Reader/Writer) apparatus having a so-called intelligent function, in which an application is built to process the card data first instead of the host system like a personal computer, is spreading.

[0005]FIG. 14 is a diagram showing an example of a general IC card system. In FIG. 14, reference numeral 101 denotes an IC card, reference numeral 102 denotes an IC card reading/writing (R/W) apparatus (equipment), reference numeral 103 denotes an intelligent-type IC card R/W apparatus, and reference numerals 104 and 105 denote a personal computer and a printing apparatus of which a host system of the IC card R/W apparatus 102 and 103 consist.

[0006] The IC card R/W apparatus 102 has a so-called path-through function to control read-out/write-in processing for the IC card 101 by the application on the personal computer 104. The IC card R/W apparatus 102 has, for example, a communication control unit 102 a, a mechanism control unit 102 b, a mechanism unit 102 c and an IC card commands processing unit 102 d, as shown in FIG. 15. Besides, reference numeral 104 a in the personal computer 104 denotes an application unit.

[0007] The communication control unit 102 a identifies a type of an R/W command (an R/W control command, an IC card command and so on, described later) received from the personal computer 104 to control a communication (transmission/reception of a command/response) with the IC card 101 according to a result of the identification. The mechanism control unit 102 b transmits an instruction to insert (fetch)/discharge the IC card 101 to the mechanism unit 102 c if a type of the R/W command accepted through the communication control unit 102 a is the R/W control command to instruct to insert/discharge the IC card 101.

[0008] The mechanism unit 102 c drives a motor or the like according to the instruction to insert/discharge the IC card 101 from the mechanism control unit 102 b so as to insert/discharge the IC card 101. The IC card command processing unit 102 d transmits a card command to get card data of the IC card 101 described later if a type of the R/W command received by the communication control unit 102 a is an IC card command, and transmits a response (including data of the IC card 101) thereto to the personal computer 6. Using this function (the pass-through function), the application unit 104 a of the personal computer 104 can directly process the card data (a reading/writing process) in the IC card 101.

[0009] With the above structure, the above-mentioned IC card R/W apparatus 102 performs an inserting/discharging process on the IC card 101 according to an instruction from the upper system (the personal computer 104 or like that). In addition to this, the IC card command processing unit 102 d transfers the card data of the inserted IC card 101 as a response to the host system. With the way described above the application (the application unit 104 a of the personal computer 104) of the host system directly performs a reading/writing process (a card data process) on the IC card 101.

[0010] The operation of the above-mentioned IC card system can be described as the following with reference to a flowchart (Steps A1 through A8) shown in FIG. 16.

[0011] When the power source for the IC card R/W apparatus 102 is switched on, the IC card R/W apparatus 102 comes to the state waiting for a command from the host system (NO route at Step A1). If the R/W command, for example, is transmitted from the personal computer 104 (Step A2) and the IC card R/W apparatus 102 receives this R/W command (if a decision at Step A1 is YES), the IC card R/W apparatus 102 checks whether a type of the received R/W command is the R/W control command or the IC card command (Steps A3 and A4).

[0012] If the received R/W command is the R/W control command (if a decision at Step A3 is YES), the mechanism control unit 102 b of the IC card R/W apparatus 102 controls the mechanism unit 102 c to drive a motor to insert/discharge the IC card 101 (Step A5), then the IC card R/W apparatus 102 transmits a command response to the R/W control command which shows the process completed normally to the personal computer 104 (Step A8).

[0013] If the command from the personal computer 104 is the IC card command (if a decision at Step A3 is NO and at Step A4 is YES), the communication control unit 102 a and the IC card command processing unit 102 d of the IC card R/W apparatus 102 performs an IC card command process on the IC card 101 as the following. Namely, the IC card R/W apparatus 102 converts the communication protocol of the card command to instruct reading/writing processing for the IC card 101 adaptive to the IC card 101 and transmits the card command to the IC card 101. Further, the IC card R/W apparatus 102 receives a response (a card response) to the transmitted card command, and converts the communication protocol of this card response (including the card data of the IC card 101) into the original communication protocol adaptive to the personal computer 104 (Step A6).

[0014] The IC card R/W apparatus 102 then transmits a command response to the R/W control command which shows the process completed normally to the personal computer 104 (Step A8). In the personal computer 104 having received this command response, the application unit 104 a performs a data process on the card data of the IC card 101 transmitted as a response. Namely, in this IC card R/W apparatus 102, the writing/reading process on the IC card 101 is directly performed by not the IC card R/W apparatus 102 itself but the application unit 104 a of the personal computer 104.

[0015] If the R/W command received from the personal computer 104 at Step A1 is neither the R/W control command nor the IC card command (if decisions at both Steps A3 and A4 are NO), the IC card R/W apparatus 102 generates an error response (Step A7), then transmits this response to the personal computer 104 to notify the received command is not normal (Step A8).

[0016] In FIG. 14, the intelligent-type IC card R/W apparatus 103 is built-in an application, by which a primary process on card data of the IC card 101 can be independently performed by the IC card R/W apparatus 103 itself. The intelligent-type IC card R/W apparatus 103 has, for example, a communication control unit 103 a, an application unit 103 b, a mechanism control unit 103 c and a mechanism unit 103 d, as shown in FIG. 17.

[0017] The communication unit 103 a controls a communication of an R/W command from the personal computer 104 (the application unit 104 a) or the application unit 103 b. The application unit 103 b identifies a type of the R/W command from the personal computer 104, executes an application processing to fetch (insert/discharge the IC card, convert a communication protocol for the IC card 101, generate/transmit a card command or the like according to the result of the identification. The mechanism control unit 103 c controls a motor or the like of the mechanism unit 103 d when the application unit 103 b identifies the type of the R/W command is the R/W control to insert/discharge the IC card 101.

[0018] The above-mentioned R/W command has a format consisting of, for example, a header unit 106, an information unit 107 and a trailer unit (CRC) 108 and the like, as shown in FIG. 18. In the header unit 106, a length LEN (bytes) of the information unit 107 is stored. In the information unit 107, an R/W command identifier (for example, “AP” in the case of an application command) 109, a command unit 110 and the like are stored. The IC card R/W apparatus 103 can judge whether a received R/W command is the application command or not based on the R/W command identifier 109.

[0019] A process in the intelligent-type IC card R/W apparatus 103 with the above structure can be described in detail as the following with reference to a flowchart (Steps B1 through B8) shown in FIG. 19.

[0020] When the IC card R/W apparatus 103 is activated (when a power source is switched on), the IC card R/W apparatus 103 comes to a command reception waiting state (NO route at Step B1). If the application unit 104 a of the personal computer 104 transmits any command (the R/W command), for example, (Step B2) and the IC card R/W apparatus 103 receives this R/W command, the IC card R/W apparatus 103 judges whether this R/W command is an application command or not based on the R/W command identifier 109 (refer to FIG. 18) stored in the R/W command (Step B3).

[0021] If the received R/W command is the application command (if a decision at Step B3 is YES), the IC card R/W apparatus 103 further judges whether this R/W command is an R/W control command to instruct to insert/discharge the IC card 101 or not (Step B4). If the R/W command is the R/W control command (if a decision at Step B4 is YES), the mechanism control unit 103 c controls the mechanism unit 103 d to insert/discharge the IC card 101 (Step B5). The IC card R/W apparatus 103 then transmits a command response to the received R/W command (the application command) which shows the process completed normally to the personal computer 104 (Step B8).

[0022] If the received R/W command is not the R/W control command (if a decision at Step B4 is NO), the application unit 103 b of the IC card R/W apparatus 103 performs application processes such as generating and transmitting a card command to the IC card 101, receiving a card response from the IC card 101, a card data process, generating a command response to the personal computer 104 (Step B6), then transmits the generated command response to the personal computer 104 (Step B8).

[0023] If the received R/W command is not the application command (if a decision at Step B3 is NO), the communication control unit 103 a of the IC card R/W apparatus 103 generates an error response (Step B7), then transmits this error response to the personal computer 104 so as to notify that the process in response to the received R/W command could not be normally performed (Step B8).

[0024] In the intelligent-type IC card R/W apparatus 103 described above, the application unit 103 b built-in is controlled according to the application command from the host apparatus such as the personal computer 104, and an application process by the application unit 103 b enables a primary process on card data.

[0025] There is another type of the intelligent-type IC card R/W apparatus 103, in which when the IC card R/W apparatus 103 is activated, the application unit 103 b built-in is automatically activated and when the IC card 101 is inserted, the application unit 103 b performs a primary process on card data of the IC card 101 by the application process describe above without a command from the personal computer 104.

[0026] In which case, when the IC card R/W apparatus 103 is activated as shown in FIG. 20, for example, the IC card R/W apparatus 103 first automatically activates the application unit 103 b in itself and comes to a state waiting for the IC card 101 is inserted (NO route at Step C1). When the IC card 101 is inserted (if a decision at Step C1 is YES), the application unit 103 b transmits the R/W control command to the mechanism control unit 103 c (Step C2), then the mechanism control unit 103 c controls the mechanism unit 103 d to fetch the IC card 101.

[0027] After that, the application unit 103 b of the IC card R/W apparatus 103 performs a card accessing process such as generating and transmitting a card command to the inserted IC card 101, receiving a card response from the IC card 101 (Step C3), then executes a card data process such as editing card data of the IC card 101 (Step C4).

[0028] When such the card data process is terminated, in the IC card R/W apparatus 103, the application unit 103 b transmits the R/W control command to instruct to discharge the IC card 101 to the mechanism control unit 103 c (Step C5), and the mechanism control unit 103 c controls the mechanism unit 103 d to discharge the IC card 101 (Step C6).

[0029] If the IC card R/W apparatus receives a command to require data of the IC card 101 having been finished over the card data process from the personal computer 104 while the process as above is being executed (Step C7), for example, the IC card R/W apparatus 103 executes a communication interrupting process as follows.

[0030] The IC card R/W apparatus 103 first inhibits an interruption which is caused by accepting; a command from another host system (Step C8). The IC card R/W apparatus 103 then edits card data of the IC card 101 having been finished the data process (Step C9), transmits it to the personal computer 104 as a command response (Steps C10 and C11), then permits an interruption from another host system (Step C12).

[0031] As an apparatus performing a reading/writing process on the IC card 101, there are, in general, provided the IC card R/W apparatus 102 having a pass-through function to implement an operation (a card inserting/discharing, a data process, etc.) on the IC card 101 by the application unit 104 a of the personal computer 104, and the intelligent-type IC card R/W apparatus 103 having an application function to implement an operation on the IC card 101 by the application unit 103 b built-in, as above.

[0032] However, each of the IC card R/W apparatus 102 and the above-mentioned intelligent-type IC card R/W apparatus 103 has only either one of the pass-through function or the application function. In consequence, it is impossible to use, for example, the intelligent-type IC card R/W apparatus 103 as the IC card R/W apparatus 102 having the pass-through function.

[0033] If a process such as directly accessing to the IC card 101 from the personal computer 104 by the application unit 104 a of the personal computer 104 is desired (if the pass-through function is desired to be used) in an IC card system using the intelligent-type IC card R/W apparatus 103, for example, it is necessary to newly connect the IC card R/W apparatus 102 having the pass-through function mentioned above to a host system such as the personal computer 104. This is quite disadvantageous in cost.

SUMMARY OF THE INVENTION

[0034] In the light of the above problem, an object of the present invention is to provide an IC card reading/writing apparatus and an IC card system, which can minimize a cost required to configure the IC card system by providing both the intelligent function and the pass-through function to the IC card reading/writing apparatus so that it is possible to perform a reading/writing process on an IC card with either function.

[0035] The present invention therefore provide an IC card reading/writing apparatus comprising an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself, the IC card reading/writing control unit having, in addition to the intelligent function, a pass-through function to control read-out/write-in processing for the IC card by an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from the host.

[0036] The present invention also provide an IC card system comprising an IC card, an intelligent-type IC card reading/writing apparatus to execute read-out/write-in processing for the IC card by an application unit in itself, and a host for an IC card reading/writing apparatus being able to send a pass-through command to the IC card reading/writing apparatus, the IC card reading/writing apparatus with an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for the IC card by an application unit in itself, the IC card reading/writing control unit having, in addition to the intelligent function, a pass-through function to control read-out/write-in processing for the IC card by an application unit in the host when receiving a pass-through command from the host.

[0037] According to the IC card reading/writing apparatus and the IC card system of this invention, one IC card reading/writing apparatus may be used as either an apparatus with the intelligent function or an apparatus with the pass-through function. It is therefore possible to simplify a configuration of the IC card system, largely reduce a cost required to built the system and contribute to flexibility of the configuration of the system.

[0038] The present invention further provide an IC card reading/writing apparatus comprising an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for the IC card by means of an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from the host, and an operation mode control unit for making the IC card reading/writing apparatus be in the state of either the intelligent function or the pass-through function in the IC card reading/writing control unit is selected according to the operation mode set in response to the operation mode command received from the host.

[0039] The present invention still further provide an IC card system comprising an IC card, an intelligent-type IC card reading/writing apparatus to execute read-out/write-in processing for the IC card by an application unit in itself, and a host for an IC card reading/writing apparatus being able to send a pass-through command to the IC card reading/writing apparatus, the IC card reading/writing apparatus with an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for the IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for the IC card by an application unit in the host by receiving a pass-through command from the host, and an operation mode control unit for making the IC card reading/writing apparatus be in a state of either the intelligent function or the pass-through function in advance according to a setting command to select the function without receiving the operation mode command.

[0040] According to the IC card reading/writing apparatus and the IC card system of this invention, it is possible to use the IC card reading/writing apparatus as an apparatus with a desired function by designing it through an operation mode command once without necessity of designating each time the intelligent function or the pass-through function through a command from the host. This feature may largely contribute to a reduction in cost required to built the system and a flexibility of the configuration of the system. Particularly, this feature is very effective if it is known beforehand whether the IC card reading/writing apparatus is used as an apparatus having either the intelligent function or the pass-through function.

BRIEF DESCRIPTION OF THE INVENTION

[0041]FIG. 1 is a block diagram showing an aspect of this invention;

[0042]FIG. 2 is a block diagram showing another aspect of this invention;

[0043]FIG. 3 is a block diagram showing an example of an IC card system according to a first embodiment of this invention;

[0044]FIG. 4 is a block diagram showing a structure of an IC card reading/writing apparatus according to the first embodiment;

[0045] FIGS. 5(a) through 5(d) are diagrams showing an example of an R/W command used in the IC card system according to the embodiment;

[0046]FIG. 6 is a diagram for illustrating a concept of a pass-through function of the IC card reading/writing apparatus according to the first embodiment;

[0047]FIG. 7 is a flowchart for illustrating an example of an operation of the IC card system according to the first embodiment;

[0048]FIG. 8 is a block diagram showing an example of an IC card system according to a second embodiment of this invention;

[0049]FIG. 9 is a block diagram showing a structure of an IC card reading/writing apparatus according to the second embodiment of this invention;

[0050] FIGS. 10(a) through 10(e) are diagrams showing an example of an R/W command used in the IC card system according to the second embodiment;

[0051]FIG. 11 is a diagram for illustrating a concept of an operation by an operation mode command used in the IC card system according to the second embodiment;

[0052]FIG. 12 is a flowchart for illustrating an example of an operation of the IC card system according to the second embodiment;

[0053]FIG. 13 is a flowchart for illustrating an example of another operation of the IC card system according to the second embodiment;

[0054]FIG. 14 is a block diagram showing an example of an IC card system;

[0055]FIG. 15 is a block diagram showing a structure of an IC card reading/writing apparatus;

[0056]FIG. 16 is a flowchart for illustrating an operation of the IC card reading/writing apparatus;

[0057]FIG. 17 is a block diagram showing a structure of an intelligent-type IC card reading/writing apparatus;

[0058]FIG. 18 is a diagram showing an example of an R/W command used in the intelligent-type IC card reading/writing apparatus;

[0059]FIG. 19 is a flowchart for illustrating an example of an operation of the intelligent-type IC card reading/writing apparatus; and

[0060]FIG. 20 is a flowchart for illustrating an example of another operation of the intelligent-type IC card reading/writing apparatus.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0061] (a) Description of Aspects of the Present Invention

[0062] Now, aspects of the present invention will be described with reference to the drawings.

[0063]FIG. 1 is a block diagram showing an aspect of this invention. In FIG. 1, reference numeral 1 denotes an IC card (smart card), reference numeral 2 denotes an intelligent-type IC card reading/writing apparatus which implements read-out/write-in processing for the IC card 1 by an application unit 211 in itself, and reference numeral 3 denotes a host system for an IC card reading/writing apparatus which can send a pass-through command to the IC card reading/writing apparatus 2.

[0064] The IC card reading/writing apparatus 2 has an IC card reading/writing control unit 21 having an intelligent function 212 to control read-out/write-in processing for the IC card 1 by means of an application unit 211 possessed by itself. Further, the IC card reading/writing control unit 21 has, in addition to the intelligent function 212, a pass-through function 213 to control read-out/write-in processing for the IC card 1 by means of an application unit 31 of the host system 3 for an IC card reading/writing apparatus by receiving a pass-through command from the host system 3.

[0065] According to the IC card reading/writing apparatus 2 and the IC card system mentioned above, the IC card reading/writing apparatus 2 has the pass-through function in addition to the intelligent function, whereby one IC card reading/writing apparatus 2 may be used as both an apparatus with the intelligent function and an apparatus with the pass-through function. This feature may simplify a configuration of the IC card system, largely reduce a cost required to build the system and contribute to flexibility of the configuration of the system.

[0066]FIG. 2 is a block diagram showing another aspect of the present invention. In FIG. 2, reference numeral 1′ denotes an IC card, reference numeral 2′ denotes an intelligent-type IC card reading/writing apparatus for implementing reading/writing from/to the IC card 1 by an application unit 211′ possessed by itself, and reference numeral 3′ denotes a host system for an IC card reading/writing apparatus which can send a pass-through command to the IC card reading/writing apparatus 2′. The IC card reading/writing apparatus 2′ has an IC card reading/writing control unit 21′ and an operation mode control unit 22′.

[0067] The IC card reading/writing control unit 21′ has an intelligent function 212′ to control read-out/write-in processing for the IC card 1′ by an application unit 211′ possessed by itself and a pass-through function 213′ to control read-out/write-in processing for the IC card 1′ by an application unit 31′ of the host system for an IC card reading/writing apparatus 3′ by receiving a pass-through command from the host system 3′. The operation mode control unit 22′ receives an operation mode command from the host system 3′ and accepts a command corresponding to an operation mode set in response to the operation mode command so as to make the IC card reading/writing apparatus 2′ be in a state where either the intelligent function 212′ or the pass-through function 213′ in the IC card reading/writing control unit 21′ is selected.

[0068] The IC card reading/writing apparatus 2′ and the IC card system mentioned above can make the IC card reading/writing apparatus 2′ be in a state where either the intelligent function or the pass-through function is selected according to the operation mode command from the host system 3′. In consequence, it is possible to use the IC card reading/writing apparatus 2′ as an apparatus having a desired function by designating it through the operation mode command once without necessity of designating each time the intelligent function or the pass-through function through a command from the host system 3′. This feature largely contributes to a reduction in cost required to configure the system and flexibility of the configuration of the system. Particularly, this feature is very effective if it is known beforehand that the IC card reading/writing apparatus 2′ is used as an apparatus having either the intelligent function or the pass-through function.

[0069] In concrete, when receiving the operation mode command from the host system 3′, the above-mentioned operation mode control unit 22′ holds an operation mode set in response to the operation mode command. When receiving an operation mode release command from the host system 3′, the operation mode control unit 22′ releases an operation mode held therein.

[0070] It is therefore possible to alter any time a use of the IC card reading/writing apparatus 2′ and use it as an apparatus with the intelligent function or the pass-through function even after the IC card system has been built since the IC card reading/writing apparatus 2′ mentioned above may hold an operation mode set in response to an operation mode command when receiving the operation mode command from the host system 3′ and release an operation mode held therein when receiving an operation mode release command from the host system 3′. If another IC card reading/writing apparatus in the system fails, for example, the apparatus 2′ may be used as a substitute for the apparatus out of order in a quite simple procedure. This feature may largely contribute to reliability of the system.

[0071] The operation mode control unit 22′ rejects a command excepting a command corresponding to an operation mode set in response to an operation mode command while holding an operation mode set in response to the operation mode command.

[0072] Since the IC card reading/writing apparatus 2′ rejects a command excepting a command corresponding to an operation mode while holding the operation mode set in response to an operation mode command from the host system 3′, there is no case where an operation mode of the IC card reading/writing apparatus 2′ is abruptly changed to another operation mode during the operation of the IC card reading/writing apparatus 2′. In consequence, it is possible to certainly and stably continue a process in an operation mode held in the apparatus 2′.

[0073] The operation mode control unit 22′ may make the IC card reading/writing apparatus 2′ be in a state where the intelligent function 212′ or the pass-through function 213′ which has a priority of being operated in the IC card reading/writing control unit 21′ is selected when accepting a command corresponding to a prior operation mode set in advance even if not receiving an operation mode command.

[0074] When accepting a command corresponding to a prior operation mode set in advance, the IC card reading/writing apparatus 2′ may be in a state where either the intelligent function or the pass-through function which has a priority of being operated is selected even if not receiving the operation mode command. This feature is very effective to provide the IC card reading/writing apparatus 2′ with a function suitable for a purpose of the use if it is known beforehand whether the IC card reading/writing apparatus 2′ is used as an apparatus with either the intelligent function or the pass-through function.

[0075] (b) Description of a First Embodiment of the Present Invention

[0076] Next, description will be made of a first embodiment of this invention referring to the drawings.

[0077]FIG. 3 is a block diagram showing an example of an IC card system according to a first embodiment of this invention. In FIG. 3, reference numeral 4 denotes an IC card (smart card), reference numeral 5 denotes an intelligent-type IC card reading/writing (R/W) apparatus with a pass-through function, reference numeral 6 denotes a personal computer as a host system to which the intelligent-type IC card R/W apparatus 5 is connected, and reference numeral 7 denotes a printing apparatus for printing a result of a process or the like of the personal computer 6. According to this embodiment, the personal computer 6, the printing apparatus 7 and the like, for example, configure a host system 8.

[0078] The above-mentioned IC card R/W apparatus 5 has an IC card R/W control unit 51 for controlling read-out/write-in processing for the IC card 4 and a mechanism unit 52 including a motor or the like for fetching (inserting)/discharging the IC card 4 as shown in FIG. 4, for example. Further, the IC card R/W control unit 51 has a communication control unit 53, an application unit 54, a pass-through function unit 55 and a mechanism control unit 56.

[0079] In the IC card R/W control unit 51, the communication control unit 53 identifies a type of an R/W command to instruct a reading/writing process on the IC card 4 from the personal computer 6 and controls a process in the IC card R/W control unit 51 according to a result of the identification. If the R/W command from the personal computer 6 is an application command to instruct to perform a reading/writing process on the IC card 4 by means of the application unit 54 built in the IC card R/W control unit 51, the application unit 54 communicates with the inserted IC card 4 to perform a card data process on card data of the IC card 4.

[0080] If the R/W command from the personal computer 6 is a pass-through command, the pass-through function unit 55 converts the communication protocol of the pass-through command adaptive to the IC card 4 and transmits it to the IC card 4 as described later. The pass-through function unit 55 further conversely converts a response to the R/W command into a communication protocol adaptive to the personal computer 6 and transmits it to the personal computer 6, thereby making the application unit 61 of the personal computer 6 perform a data process on the card data of the IC card 4.

[0081] The mechanism control unit 56 receives an R/W control command to instruct to fetch/discharge the IC card 4 from the application unit 54 or the personal computer 6 so as to fetch/discharge the IC card 4 by driving a motor or the like of the mechanism unit 52.

[0082] Incidentally, the R/W command used in the above-mentioned intelligent-type IC card R/W apparatus 5 has, in general, a header part 11, an information part 12 and a trailer part (CRC) 13. The header part 11 is used to store a length “LEN” (bytes) of the information part 12, the information part 12 is used to store various commands for the IC card R/W apparatus 5, and the trailer part (CRC) 13 is used to check a command as shown in FIG. 5(a), for example. Further, the information part 12 is used to store an application command to control the application unit 54 having an R/W command identifier (“AP”, for example) 14 and a command part 15 which is designated a command code, a parameter and the like as shown in FIG. 5(b), for example.

[0083] Whereby, the intelligent-type IC card R/W apparatus 5 can identify whether an R/W command is the application command or not based on the R/W command identifier 14 stored in the information unit 12 when receiving the R/W command having the above-mentioned format from the personal computer 6.

[0084] For instance, when an existing intelligent-type IC card R/W apparatus receives the application command stored an identifier (“AP”) in the R/W command identifier 14 and designated a command to accumulate any data in the command code of the command part 15, the application unit 54 of the existing R/W apparatus gives an instruction to fetch the IC card 4 to the mechanism control unit 56. The mechanism control unit 56 given the instruction controls the mechanism unit 52 so as to fetch the IC card 4. The IC card R/W apparatus then reads out data in the IC card 4 to accumulate the data, then notifies a result of the accumulation to the personal computer 6.

[0085] This application command is, however, a command prepared to make the application unit 54 built in the intelligent-type IC card R/W apparatus 5 execute a control on the reading/writing process (the intelligent function) on the IC card 4. Therefore, this application command cannot make the pass-through function unit 55 execute a control on the reading/writing process (the pass-through function) on the IC card 4.

[0086] According to this embodiment, there are newly prepared an R/W control command as shown in FIG. 5(c) and a pass-through command as shown in FIG. 5(d), for example, in order to execute the pass-through function, in addition to the existing application command [refer to FIG. 5(b)]. In the R/W control command, an identifier (“RW”, for example) 14 representing “R/W control” and a command part 15 designating the R/W control (card inserting/discharging) are stored as shown in FIG. 5(c). In the pass-through command, an identifier (“CD”, for example) 14 representing “pass-through” and a command part 15 designating a command and a parameter for the IC card 4 are stored as shown in FIG. 5(c).

[0087] Only if the R/W control command or the pass-through command is stored in the information unit 12 of the R/W command similarly to the existing application command [refer to FIG. 5(a)] and transmitted to the intelligent-type IC card R/W apparatus 5, even the intelligent-type IC card R/W apparatus 5 can directly perform a reading/writing process on card data of the IC card 4 from the application unit 61 of the personal computer 6 in the host system 8 not from the application unit 54 built therein.

[0088] Namely, the above-mentioned IC card R/W apparatus 5 has the IC card R/W control unit 51 having the intelligent function to implement a control on read-out/write-in processing for the IC card 4 by the application unit 54 possessed by itself. Further, the IC card R/W control unit 51 has, in addition to the intelligent function, the pass-through function unit 55 for controlling read-out/write-in processing for the IC card 4 by the application unit 61 of the host system 6 by receiving the pass-through command from the personal computer 6.

[0089] Concretely, the pass-through function unit 55 deletes the header part (LEN) 11, the trailer part 13 and the command identifier 14 of the received R/W command (in a nest state where the pass-through command having a card command in the command part 15 is stored in the information part 12) from the personal computer 6 as shown in FIG. 6, for example. After that, the pass-through function unit 55 gives a checking byte (EDC) to the card command to convert the communication protocol of the received R/W command adaptive to the IC card 4 and transmits the R/W command to the IC card 4. On the other hand, the pass-through function unit 55 performs an inverse process of the above on a response from the IC card 4 to convert the communication protocol of the response into the original communication protocol (adaptive to the personal computer 6), and transmits the response to the personal computer 6.

[0090] An operation of the IC card system having the above structure can be described as following in detail with reference to a flowchart (Steps S1 through S19) shown in FIG. 7.

[0091] The intelligent-type IC card R/W apparatus 5 first comes to a command reception waiting state when activated (NO route at Step S1). If the personal computer 6 transmits the R/W command (Step S2) and the intelligent-type IC card R/W apparatus 5 receives the R/W command in this state (if a decision at Step S1 is YES), the communication unit 53 in the IC card R/W apparatus 5 judges whether the received R/W command is the application command, the R/W control command or the pass-through command (Steps S3 through S5).

[0092] If the received R/W command is, for example, the application command (a decision at Step S3 is YES), the application unit 54 transmits an instruction to insert (fetch) the IC card 4 to the mechanism control unit 56 (Step S6), the control unit 56 thereby controls the mechanism unit 52 to fetch the IC card 4 (Step S7).

[0093] After that, the application unit 54 generates a card command for the IC card 4 and transmits it to the IC card 4 (Step S8). When receiving a response to the card command (Step S9), the application unit 54 performs an application process such as a reading process, an editing process and the like on card data in the IC card 4 (Step S10).

[0094] When the application process is terminated, the application unit 54 gives an instruction to discharge the IC card 4 to the mechanism control unit 56 (Step S11), the mechanism control unit 56 thereby controls the mechanism unit 52 to discharge the IC card 4 (Step S12). After that, the application unit 54 generates a response to the personal computer 6 (Step S13), and transmits it to the personal computer 6 through the communication control unit 53 (Step S14).

[0095] If the R/W command received from the personal computer 6 is the R/W control command (a decision at Step S3 is NO and at Step S4 is YES), in the intelligent-type IC card R/W apparatus 5, the mechanism control unit 56 controls the mechanism unit 52 to perform only an inserting/discharging process on the IC card 4 (Steps S7 and S12), then a response to the received R/W control command is transmitted to the personal computer 6 through the communication control unit 53 (Step S14).

[0096] If the R/W command received from the personal computer 6 is the pass-through command (if decisions at Steps S3 and S4 are NO and at Step S5 is YES), in the intelligent-type IC card R/W apparatus 5, the pass-through function unit 55 converts the communication protocol of the received R/W command (the card command) adaptive to the IC card 4 as described before with reference to FIG. 6, and transmits the R/W command to the IC card 4 (Steps S15 and S16). The pass-through function unit 55 then converts the communication protocol of the response to the card command adaptive to the personal computer 6 (Steps S17 and S18), then transmits the response to the personal computer 6 (Step S14).

[0097] If the R/W command received from the personal computer 6 is neither the application command nor the R/W control command nor the pass-through command (if decisions at Steps S3 through S5 are all NO), the communication control unit 53 generates an error response (Step S19), and transmits this error response to the personal computer 6 (Step S14).

[0098] According to the IC card system of this embodiment, the IC card R/W apparatus 5 has the IC card R/W control unit 51 having the intelligent function to control read-out/write-in processing for the IC card 4 by the application unit 54 in itself. Further, the IC card R/W control unit 51 has, in addition to the intelligent function, the pass-through function to read/write from/to the IC card 4 by means of the application unit 61 of the personal computer 6 by receiving the pass-through command from the personal computer 6, as above. It is therefore possible to use one intelligent-type IC card R/W apparatus 5 as either an R/W apparatus with the intelligent function or an R/W apparatus with the pass-through function.

[0099] In consequence, it is possible to simplify a structure of the IC card system with only the above-mentioned intelligent-type IC card R/W apparatus 5, largely reduce a cost required to configure the system and largely contribute to flexibility of the configuration of the system.

[0100] (c) Description of a Second Embodiment of the Present Invention

[0101]FIG. 8 is a block diagram showing an example of an IC card system according to a second embodiment of this invention. In FIG. 8, reference numeral 4 denotes an IC card, reference numeral 5′ denotes an intelligent-type IC card reading/writing (R/W) apparatus, reference numeral 6 denotes a personal computer as a host system to which the IC card R/W apparatus 5′ is connected, and reference numeral 7 denotes a printing apparatus for printing a result of a process or the like of the personal computer 6. According to this embodiment, the personal computer 6, the printing apparatus 7 and the like configure, for example, the host system 8, as well.

[0102] The above-mentioned IC card R/W apparatus 5′ has an IC card R/W control unit 51′ for controlling read-out/write-in processing for the IC card 4 and a mechanism unit 52 having a motor and the like used to fetch/discharge the IC card 4 as shown in FIG. 9, for example. According to this embodiment, the IC card R/W control unit 51 has a communication control unit 53, an application unit 54, a pass-through function unit 55, and a mechanism control unit 56 which are similar to those according to the first embodiment. The IC card R/W control unit 51′ also has an operation mode control unit 57.

[0103] The operation mode control unit 57 sets either an application mode (an intelligent mode) to control reading/writing process on the IC card 4 by the application unit 54, or a pass-through mode to control reading/writing process on the IC card 4 by the pass-through function unit 55 according to an operation mode command from the personal computer 6 described later.

[0104] Namely, the above-mentioned IC card R/W apparatus 5′ has the IC card R/W control unit 51′ having the intelligent function to control read-out/write-in processing for the IC card 4 by means of the application unit 54 in itself and the pass-through function unit 55 for controlling read-out/write-in processing for the IC card 4 by means of the application unit of the personal computer 6 by receiving a pass-through command from the personal computer 6. The IC card R/W apparatus 5′ thereby receives an operation mode command from the personal computer 6 and accepts a command corresponding to an operation mode set in response to the operation mode command so that the operation mode control unit 57 can select either the intelligent function or the pass-through function in the IC card R/W control unit 51′.

[0105] Incidentally, the operation mode command has, similarly to the first embodiment, an R/W command identifier (“MD”, for example) 14 and a command part 15 designated instruction to release the application mode or the pass-through mode as shown, for example, in FIG. 10(e). The operation mode command is stored in an information part 12 of an R/W command having a format as shown in FIG. 10(a) similarly to the application command, the R/W control command and the pass-through command shown in FIGS. 10(b) through 10(d), respectively, and transmitted from the personal computer 6.

[0106] If an operation mode of the IC card R/W apparatus 5′ is set according to the operation mode command as shown in FIG. 11, for example, the operation mode set is held in a storage 58 within the IC card R/W apparatus 5′. The set operation mode is cleared when a power supply of the IC card R/W apparatus 5′ is switched off. If the set operation mode is released, the operation mode held in the storage 58 is cleared. If the operation mode is not set, a command excepting the R/W control command is rejected.

[0107] Next an operation of the IC card system having the above structure can be described as following with reference to a flowchart (Steps S21 through S42) shown in FIG. 12.

[0108] When activated (when a power supply is switched on), the IC card R/W apparatus 5′ comes to a command reception waiting state (NO route at Step S21). When the personal computer 6 transmits the R/W command (Step S22) and the IC card R/W apparatus 5′ receives this R/W command in this state (if a decision at Step 21 is YES), in the IC card R/W apparatus 5′, the communication control unit 53 judges whether the received R/W command is the operation mode command, the application command, the R/W control command or the pass-through command according to the R/W command identifier 14 in the received R/W command (Steps S23 through S26).

[0109] If the received R/W command is the application command (if a decision at Step S23 is YES), the operation mode control unit 57 further judges whether the operation mode command is an application mode set command, a pass-through mode set command or a mode clear command (Steps S27 through S29).

[0110] If the received R/W command (the operation mode command) is the application mode set command (if a decision at Step S27 is YES), the application mode is set (Step S30). If the received R/W command is the pass-through mode set command (a decision at Step S27 is NO and at Step S28 is YES), the pass-through mode is set (Step S31). If the received R/W command is the mode clear command (if decisions at Steps S27 and S28 are NO and at Step S29 is YES), a mode now being set (held) is cleared (Step S32).

[0111] If the received R/W command (the application command) is neither the application mode set command nor the pass-through mode set command nor the mode clear command (if decisions at Steps S27 through S29 are all NO), the operation mode control unit 57 generates an error response (Step S33), and the communication control unit 53 transmits the error response to the personal computer 6 (Step S42).

[0112] If the received R/W command is the application command (a decision at Step S23 is NO and at Step S24 is YES), the application unit 54 judges whether the operation mode having been already set is the application mode (the AP mode) or not (Step S34). If the application mode has been set (if a decision at Step S34 is YES), the mechanism control unit 56 controls the mechanism unit 52 to fetch the IC card 4.

[0113] After that, the application unit 54 performs an application process such as a reading process, an editing process or the like on card data of the IC card 4. And then the mechanism control unit 56 controls the mechanism unit 52 to discharge the IC card 4 (Steps S35 through S37) and the communication control unit 53 transmits a response to the personal computer 6 (Step S42).

[0114] If the application mode has not been set when the application command is received (if a decision at Step S34 is NO), the application unit 54 generates an error response (Step S38), and transmits it to the personal computer 7 (Step S42).

[0115] If the R/W command received from the personal computer 6 is the R/W control command (if decisions at Steps S23 and S24 are NO and at Step S25 is YES), the mechanism control unit 56 controls the mechanism unit 52 to perform only the inserting/discharging process on the IC card 4 (Steps S36 and S37), then a response to the R/W control command is transmitted to the personal computer 6 by the communication control unit 53 (Step S42).

[0116] If the R/W command received from the personal computer 6 is the pass-through command (if decisions at Steps S23 through S25 are NO and at Step S26 is YES), the pass-through function unit 55 judges whether the operation mode having been already set is the pass-through mode or not (step S38′). If the pass-through mode is set (if a decision at Step S38′ is YES), the pass-through function unit 55 converts the communication protocol of the received R/W command (the pass-through command including the card command) adaptive to the IC card 4 and transmits the R/W command to the IC card 4. Then the pass-through function unit 55 converts the communication protocol of the response to this card command adaptive to the personal computer 6 (Step S39) and transmits the response to the personal computer 6 (Step S42), as described before with reference to FIG. 6.

[0117] If the operation mode having been already set is not the pass-through mode when the pass-through command is received (if a decision at Step S38 is NO), the pass-through function unit 55 generates an error response, either (Step S40), and the error response is transmitted to the personal computer 6 (step S42).

[0118] If the R/W command received from the personal computer 6 is neither the operation mode command nor the application mode command nor the R/W control command nor the pass-through command (if decisions at Steps S23 through S26 are NO), the communication control unit 53 generates an error response (Step S41), then this error response is transmitted to the personal computer 6 (Step S42).

[0119] According to the IC card system of this embodiment, it is possible to make the IC card R/W apparatus 5′ be in a state of the application mode (the intelligent function) or the pass-through mode (the pass-through function) is selected according to the operation mode command from the personal computer 6. The IC card R/W apparatus 5′ therefore may be used as an R/W apparatus operative in a desired mode by designating it once using the operation mode command without necessity of designating each time the intelligent function or the pass-through function using a command from the personal computer 6.

[0120] In this case, this embodiment contributes to a reduction in cost required to configure the system and flexibility of the system. In particular, this embodiment is very effective if it is known beforehand that the IC card R/W apparatus 5′ is used as an apparatus having either the intelligent function or the pass-through function.

[0121] When receiving the operation mode command from the personal computer 6, the above-mentioned IC card R/W apparatus 5′ holds an operation mode set by the operation mode command. When receiving the mode clear command (an operation mode release command) from the personal computer 6, the IC card R/W apparatus 5′ can clear (release) the held operation mode. In consequence, it is possible to alter any time a use of the IC card R/W apparatus 5′ into an apparatus with the intelligent function or an apparatus with the pass-through function even after the system has been built.

[0122] If another IC card R/W apparatus in the system fails, for example, it is possible to use the IC card R/W apparatus 5′ as a substitute for the failing IC card R/W apparatus in an extremely simple procedure. This feature largely contributes to reliability of the system.

[0123] Further, the above-mentioned IC card R/W apparatus 5′ rejects a command excepting a command corresponding to an operation mode while holding the operation mode set by the operation mode command from the personal computer 6 as described hereinbefore at Step S38 or Step S40 in FIG. 12. Accordingly, it is not happened that the IC card R/W apparatus 5′ is abruptly shifted into another operation mode while the IC card R/W apparatus 5′ is in an operation. The IC card R/W apparatus 5′ therefore can certainly and stably continue a process in an operation mode that the IC card R/W apparatus 5′ holds.

[0124] In the above-mentioned IC card system, a procedure until the application command, the pass-through command or the like is issued is established. Therefore, the upper personal computer 6 can always recognize an issued command, whereby security of the IC card system may be improved.

[0125] In the above-mentioned IC card R/W apparatus 5′, it is possible that an operation mode that has a priority is set in advance, and a command corresponding to the prior mode set is thereby operable irrespective of an operation mode having been already set.

[0126] For instance, if an operation mode that has a priority is set in advance is set as the application mode (the intelligent function), the application process by the application unit 54 is preferentially implemented (Step S35) without a judging process as having been described at Step S34 in FIG. 12 (a judging process whether an operation mode having been set is the application mode or not) if the R/W command from the personal computer 6 is the application command (if a decision at Step S24 is NO).

[0127] Incidentally, another processes are implemented similarly to the processes having been described with reference to FIG. 12. If an operation mode that has a priority is set in advance to the pass-through mode (the pass-through function), the pass-through process by the pass-through function unit 55 is preferentially executed without a judging process as having been described at Step S38 in FIG. 12 (a judging process whether an operation mode having been set is the pass-through mode or not).

[0128] In this case, when the IC card R/W apparatus 5′ accepts a command corresponding to a prior operation mode set in advance, the IC card R/W apparatus 5′ may be brought to a state where either the intelligent function or the pass-through function that has a priority is selected even if not receiving the operation mode command. If it is known beforehand that the IC card R/W apparatus 5′ is used as an apparatus having either the intelligent function or the pass-through function, for example, it is possible to provide quite efficiently the IC card R/W apparatus 5′ having a function suitable for a purpose of the use. As a result, facility of the IC card R/W apparatus 5′ in relation with the upper personal computer 6 (the host system 8) may be improved.

[0129] A method of setting a prior operation mode is not particularly cared. However, there would be possible a method in which the prior operation mode is set in advance by means of an outer setting function of the intelligent-type IC card R/W apparatus 5′ or a method in which the prior operation mode is fixedly set in the intelligent-type IC card R/W apparatus 5′. 

What is claimed is:
 1. An IC card reading/writing apparatus comprising: an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself; said IC card reading/writing control unit having, in addition to said intelligent function, a pass-through function to control read-out/write-in processing for said IC card by an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from said host.
 2. An IC card reading/writing apparatus comprising: an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for an IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for said IC card by an application unit in a host for an IC card reading/writing apparatus by receiving a pass-through command from said host; and an operation mode control unit for making said IC card reading/writing apparatus be in the state of either said intelligent function or said pass-through function in said IC card reading/writing control unit is selected according to the operation mode set in response to said operation mode command received from said host.
 3. The IC card reading/writing apparatus according to claim 2 , wherein said operation mode control unit holds an operation mode set in response to an operation mode command received from said host, and releases said operation mode when receiving an operation mode release command from said host.
 4. The IC card reading/writing apparatus according to claim 2 , wherein said operation mode control unit rejects a command not according to an operation mode set previously by said operation mode command.
 5. The IC card reading/writing apparatus according to claim 2 , wherein said operation mode control unit makes said IC card reading/writing apparatus be in a state of either said intelligent function or said pass-through function in advance according to a setting command to select said function without receiving said operation mode command.
 6. An IC card system comprising: an IC card; an intelligent-type IC card reading/writing apparatus to execute read-out/write-in processing for said IC card by an application unit in itself; and a host for an IC card reading/writing apparatus being able to send a pass-through command to said IC card reading/writing apparatus; said IC card reading/writing apparatus with an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for said IC card by an application unit in itself, said IC card reading/writing control unit having, in addition to said intelligent function, a pass-through function to control read-out/write-in processing for said IC card by an application unit in said host when receiving a pass-through command from said host.
 7. An IC card system comprising: an IC card; an intelligent-type IC card reading/writing apparatus to execute read-out/write-in processing for said IC card by an application unit in itself; and a host for an IC card reading/writing apparatus being able to send a pass-through command to said IC card reading/writing apparatus; said IC card reading/writing apparatus with an IC card reading/writing control unit having an intelligent function to control read-out/write-in processing for said IC card by an application unit in itself and a pass-through function to control read-out/write-in processing for said IC card by an application unit of said host by receiving a pass-through command from said host, and an operation mode control unit for making said IC card reading/writing apparatus be in a state of either said intelligent function or said pass-through function in advance according to a setting command to select said function without receiving said operation mode command. 